﻿<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set var="ctx" value="${pageContext.request.contextPath}" scope="application"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<!-- 包含公共的JSP代码片段 -->
	
<title>餐馆王平台</title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="${ctx}/front/detail/style/js/jquery.js"></script>
<script type="text/javascript" src="${ctx}/front/detail/style/js/page_common.js"></script>
<link href="${ctx}/front/detail/style/css/common_style_blue.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="${ctx}/front/detail/style/css/index_1.css" />
	<style type="text/css">
	* {
		margin: 0px;
		padding: 0px
	}
	#dish_2 a{
		text-decoration:none;
		font-size:36px;
		color:#000;
	}
	#dish_2 ul { 
		list-style:none;
	} 
	#dish_2 li{
		background:url(style/images/img/btn.gif);
		width:164px;
		height:47px;
		text-align:center;
		padding-top:5px;
	}
	#center_bottom #select{
		width: 250px;
		height: 50px;
		font-size: 28px;
		font-weight: 600;
		border-radius: 100px;
		background: #6522;
		padding: 0px 7%;
		margin: 0 20px;
		outline:none;
	}
	#center_bottom button{
		width: 85px;
		height: 50px;
		border-radius: 100px;
		background: #82230a;
		color: #fff56a;
		font-weight: 600;
		font-size: 23px;
		cursor: pointer;
		outline:none;
	}
	</style>
</head>
<body style="text-align: center">
	<!--外部的大层-->
	<div class="index_all" style="text-align:center;">
		<!--上面的背景层-->
		<div>
			<img src="${ctx}/front/detail/style/images/flower.gif" />
		</div>
		<!--中间层-->
		<div id="index_center">
			<!--中间层的空白层-->
			<div id="space">
				
			</div>
			<!--中间层的菜单层-->
			<div>
				<!--菜单层的左边-->
				<div id="index_centerleft"></div>
				<!--菜单层的中间-->
				<div class="bg_middle">
					<img
						src="${ctx}/front/detail/style/images/index_menu.gif"
						border="0" usemap="#Map" />
					<map name="Map" id="Map">
						<area shape="rect" coords="164,99,354,199" href="#" />
					</map>
				</div>
				<!--中间层的右边-->
				<div id="index_centerright"></div>
			</div>

			<!--放桌子的层-->
			<div id="center_bottom" style="display: flex;justify-content: center">
				<select id="select">

				</select>
<%--				<ul style=" display:inline-table">--%>
						<%--<li>
							<a href="${ctx}/front/detail/caidan.jsp">
								纽约
							</a>
						</li>
						<li>
							<a href="detail/caidan.jsp">
								丹麦
							</a>
						</li>
						<li>
							<a href="detail/caidan.jsp">
								伦敦
							</a>
						</li>--%>
					
<%--				</ul>--%>
				<button onclick="entry()">进入</button>
			</div>
		</div>
		
		<!--下面的背景层-->
		<div>
			<img src="${ctx}/front/detail/style/images/flower.gif" />
		</div>
	</div>
	<script type="application/javascript">
		$.ajax({type:"get",
			url:"${ctx}/front/data?method=getTables",
			dataType:'json',
			success:function(data) {
				if(data && !data.success && data.data){
					alert(data.message);
					window.location.href = "data?method=getOrderList&orderId="+data.data;
					return;
				}
				$("#center_bottom #select").empty();
				$.each(data,function(i,e){
					$("#center_bottom #select").append(
						<%--"<li><a href='${ctx}/front/detail/caidan.jsp'>" + e.tableName + "</a></li>"--%>
							"<option value='" + e.tableId + "'>" + e.tableName +"</option>"
					)
				})
			}
		})

		function entry(){
			var value = $("#center_bottom #select").val();
			if(value){
				window.location.href = "${ctx}/front/data?method=getFoodList&tableId="+$("#center_bottom #select").val();
			}
		}
	</script>
</body>
</html>